home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1987 December / 1987-12.d64 / sample sketcher (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  1KB  |  58 lines

  1. 10 ifk=0thenk=1:load"grafnastics",8,1
  2. 20 poke53281,0:poke53280,0:a=49152:a$="m":goto200
  3. 30 a=49152:a$="":geta$:ifa$=""then210
  4. 40 ifa$="h"thensysa,8
  5. 50 ifa$="t"thensysa,9
  6. 60 ifa$="r"thensysa,7
  7. 70 ifa$="i"thensysa,6
  8. 80 ifa$=chr$(145)thensysa,5
  9. 90 ifa$=chr$(17)thensysa,4
  10. 100 ifa$=chr$(157)thensysa,3
  11. 110 ifa$=chr$(29)thensysa,2
  12. 120 ifa$="p"thensysa,1
  13. 130 ifa$="l"then310
  14. 140 ifa$="s"then320
  15. 150 ifa$="0"thenpoke49711,0
  16. 160 ifa$="1"thenpoke49711,1
  17. 170 ifa$="2"thenpoke49711,2
  18. 180 ifa$="c"thensysa,12
  19. 190 ifa$="u"thensysa,10
  20. 200 ifa$="m"thensysa,9:gosub380:goto30
  21. 210 n=(peek(56320)and15):ifn=15then30
  22. 220 x=x+((n>8)and(n<12))-((n<8)and(n>4))
  23. 230 y=y-(n=13)-(n=9)-(n=5)+(n=14)+(n=10)+(n=6)
  24. 240 x=x-(x<0)+(x>319):y=y-(y<0)+(y>199):x2=x
  25. 250 x1=-(x>255):poke49716,x1:ifx1=1thenx2=x2-256
  26. 260 poke49715,x2
  27. 270 poke49718,y
  28. 280 sys49483
  29. 290 ifpeek(49711)=0thensys49152,9:printx,y,peek(2)
  30. 300 goto30
  31. 310 k=1:sysa,11:sysa,9:input"[147]load filename";na$:sysa,8:loadna$,8,1
  32. 320 sysa,9:input"[147]save filename";na$:ifna$=chr$(13)then30
  33. 330 print"please wait..."
  34. 340 open15,8,15:open8,8,8,"0:"+na$+",p,w":print#8,chr$(0)chr$(92);
  35. 350 fori=23552to32575:input#15,e1$,e2$
  36. 360 ife1$="00"thenprint#8,chr$(peek(i));:next
  37. 370 printe1$,e2$:fori=0to1000:next:close8:close15:goto30
  38. 380 print"[147][159]  copyright 1987 compute! pub., inc."
  39. 390 printtab(10)"all rights reserved"
  40. 400 print"m[146] menu"
  41. 410 print"0[146] peek"
  42. 420 print"1[146] draw"
  43. 430 print"2[146] erase"
  44. 440 print"h[146] hi-res"
  45. 450 print"p[146] perspective"
  46. 460 print"r[146] rotate"
  47. 470 print"t[146] text"
  48. 480 print"u[146] undo"
  49. 490 print"i[146] invert"
  50. 500 print"s[146] save"
  51. 510 print"l[146] load"
  52. 520 print"c[146] clear screen"
  53. 530 print"crsr-lt[146] mirror r to l"
  54. 540 print"crsr-rt[146] mirror l to r"
  55. 550 print"crsr-dn[146] mirror t to b"
  56. 560 print"crsr-up[146] mirror b to t"
  57. 570 return
  58.